# coding=utf-8
a = str(input())
b = list(a)
b.reverse()
c = ''
for j in b:
    if j not in c:
        c += j
print(int(c))
